<!DOCTYPE html>
<html>

<head>
    <title>短信账号管理</title>
    <include file='public/head'>
</head>

<body>
    <div class="wrap js-check-wrap" id="addFormJt">

        <form method="POST" class="js-ajax-form" id="add-form" action="">
            <table class="table table-bordered table-hover" style="text-align:center;">
                <input type="hidden" name="id" value="{$data.id}">
                <input type="hidden" name="total_num" value="{$data.total_num}">
                <tr>
                    <td class="td-head">用户id</td>
                    <td class="td-body">
                        <input type="text" class="form-control" required name="uid" placeholder="输入用户id" value="{$data.uid}" />
                    </td>
                </tr>
                <tr>
                    <td class="td-head">用户账号</td>
                    <td class="td-body">
                        <input type="text" class="form-control" required name="account" placeholder="输入用户账号" value="{$data.account}" />
                    </td>
                </tr>
                <tr>
                    <td class="td-head">用户密码</td>
                    <td class="td-body">
                        <input type="text" class="form-control" required name="password" placeholder="输入用户密码" value="{$data.password}" />
                    </td>
                </tr>
                <!-- <tr>
                    <td class="td-head">短信条数</td>
                    <td class="td-body">
                        <input type="text" class="form-control" required name="total_num" placeholder="输入短信条数" value="{$data.uid}" />
                    </td>
                </tr> -->
                <tr>
                    <td class="td-head">短信签名</td>
                    <td class="td-body">
                        <input type="text" class="form-control" required name="signature" placeholder="输入短信签名" value="{$data.signature}" />
                    </td>
                </tr>
                <tr>
                    <td class="td-head">备注</td>
                    <td class="td-body">
                        <textarea name="remark" id="" class="form-control" rows="10">{$data.remark}</textarea>
                    </td>
                </tr>
            </table>
            <div style="text-align:center;">
                <!-- <button type="submit" class="btn btn-success js-ajax-submit" name="on" >提交</button> -->
                <!-- 测试的时候js-ajax-submit从class里取出来 -->
            </div>
        </form>
    </div>


    <include file="public/scripts" />
    <script src="__STATIC__/js/layer/layer.js"></script>


    <script type="text/javascript">

        /**
         * 获取窗口中的元素，然后返回给父级
         * @return {[type]} [description]
         */
        function callbackdata() {
            var obj = {};
            var uid = $('input[name=uid]').val();
            if (uid.length == 0) {
                layer.msg('用户id不能为空');
                return false;
            }
            var account = $('input[name=account]').val();
            if (account.length == 0) {
                layer.msg('用户帐号不能为空');
                return false;
            }
            var password = $('input[name=password]').val();
            if (password.length == 0) {
                layer.msg('用户密码不能为空');
                return false;
            }
            var total_num = $('input[name=total_num]').val();
            if (total_num.length == 0) {
                layer.msg('短信条数不能为空');
                return false;
            }
            var signature = $('input[name=signature]').val();
            if (signature.length == 0) {
                layer.msg('短信签名不能为空');
                return false;
            }
            var remark = $('textarea[name=remark]').val();
            var id = $('input[name=id]').val();

            obj['id'] = id;
            obj['uid'] = uid;
            obj['account'] = account;
            obj['password'] = password;
            obj['total_num'] = total_num;
            obj['signature'] = signature;
            obj['remark'] = remark;
            return obj;
        }    
    </script>

</body>

</html>